package com.glory.cqaospda.viewmodel

import com.glory.cqaospda.model.TaskRepository
import com.glory.mvvmnet.base.BaseViewModel
import com.glory.mvvmnet.entity.CallObserveBean
import com.google.gson.JsonObject

class WorkCardModel :BaseViewModel() {
    private val repository by lazy { TaskRepository() }

    fun getLoginData(WorkCardID:String,user: String, password: String) {
        launchOnlyResult({
            val map = JsonObject()
            map.addProperty("UserName", user)
            map.addProperty("Password", password)
            map.addProperty("CardID", WorkCardID)
            val userInfoEntry = repository.defaultUserInfoEntry(map,"EMS_UserInfoEntry")
            defUI.callObserve.value = CallObserveBean(1,userInfoEntry)
        })
    }

}